<template>
	<view class="ques">
		<!-- f1 描述问题文本框 -->
		<textarea class="textarea" v-model="txt" placeholder="请描述你的问题" placeholder-style="font-size:18px" confirm-type="send"></textarea>
		<!-- f2 添加标签以及发布按钮 -->
		<view class="setup">
			<view class="content">
				<text>#添加话题</text>
				<button size="mini">发布</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				txt: ""
			}
		},
		watch: {
			txt(txt) {
				if (txt.indexOf('\n') != -1) { //敲了回车键了
					uni.hideKeyboard() //收起软键盘
				}
			}
		},
		methods: {}
	}
</script>

<style scoped lang="scss">
	.ques {
		display: flex;
		flex-direction: column;

		.textarea {
			font-size: 18px;
			width: 750rpx;
			height: 450rpx;
			background-color: #fff;
			padding: 20rpx;
		}

		.setup {
			background-color: #fff;
			
			.content {
				width: 710rpx;
				margin: auto;
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				border-bottom: 1px solid rgba(0, 0, 0, .1);
				border-top: 1px solid rgba(0, 0, 0, .1);
				padding: 50rpx 0;
				
				text{
					color: #797979;
				}
				
				button{
					background-color: #3E64FF;
					color: #fff;
				}
			}
		}
	}
</style>
